<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
            <form class="omb_loginForm" action="/italiaCives/dashboard" autocomplete="off" method="POST">
                <input type="hidden" name="id_ente" id="id_ente" value=""/>
                <h3 class="help-block">Cerca un altro comune:</h3>
            </div>
            <div class="modal-body">
                 <div class="col-xs-12 col-sm-12 col-lg-12 input-group">
                    <input class="form-control" type="text" name="ente" id="ricerca_entry_articolo_modal" placeholder="Inserisci qui la tua ricerca" >
                    <a class="search_cmplx input-group-addon" id="ricerca_complessa_articolo" href="#">
                        <span class=" glyphicon glyphicon-search" data-toggle="modal" data-target="#myModal"></span>
                    </a>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn  btn-primary btn-block" type="submit">Cambia</button>
            </div>
            </form>
        </div>
    </div>
</div>

<script type="text/javascript">
$(document).ready(function(){
$( "#ricerca_entry_articolo_modal" ).autocomplete({
    appendTo: "#myModal",
    source: "/pg/as_Ente/GetEnti?servizio=ItaliaCives",
    select: function( event, ui ) {
        //event.preventDefault(); //blocco il default perchè mi serve il campo svuotato
        $("#id_ente").val(ui.item.id_ente);
        $( "#ricerca_entry_articolo_modal" ).autocomplete( "close" );
    }
        });


});
</script>
